package com.lin.operatorlogrecord.content;

import com.lin.operatorlogrecord.unit.OperatorLogUtil;

import java.util.List;

/**
 * @Author: chenghao.lin
 * @Date: 2023/09/25
 * @Description: 批量新增子对象内容生成器
 */
public class SubObjectAddBatchUtil {

    public String generatorContent(Class<?>[] tableEntity, List<String> requestObj, String operatorObjId) {
        String addObjNames = OperatorLogUtil.listObjName(requestObj, tableEntity[1]);
        String subObjTypeName = OperatorLogUtil.getObjectTypeEnum(tableEntity[1]).getName();
        String objName = OperatorLogUtil.getObjName(operatorObjId, tableEntity[0]);
        String objTypeName = OperatorLogUtil.getObjectTypeEnum(tableEntity[0]).getName();
        return OperatorLogContentUtil.addBatchSubObjFormat(addObjNames, subObjTypeName, objName, objTypeName);
    }
}
